<template>
		<!-- <vue-pdf-embed :source="source"
		class="vue-pdf-embed"
		:style="scaleFun"
		v-for="item in numPages" :key="item" :page="item" onload="loadPdf"/> -->
	<iframe v-if="win" class="pdf" src="/陈斌简历.pdf" style="width: 100%; height: calc( 100vh - 60px );overflow: auto;" frameborder="0"></iframe>
	<template v-else>
		<iframe ref="iframe" src="https://static-12e0d389-3ffa-4017-9f39-7f45553bc008.bspapp.com/" style="width: 100%; height: calc( 100vh - 60px );" frameborder="0"></iframe>
		<div @click="qp" class="qp">全屏</div>
	</template>
</template>
<script setup>
const win=ref(/^Win/.test(navigator.platform)===true)
const iframe=ref(null)
function qp(){
	console.log("1:",1);
	if(win){
		const box=iframe.value
		if(box.requestFullscreen){
	     box.requestFullscreen()
		}else if(box.webkitRequestFullscreen){
			//谷歌浏览器
			box.webkitRequestFullscreen()
		}else if(box.mozRequestFullScreen){
			//火狐浏览器
			box.mozRequestFullScreen()
		}else if(box.msRequestFullscreen){
			//IE浏览器
			box.msRequestFullscreen()
		}else{
			alert('你的浏览器太low了')
		}

	}
}
</script>
 
<style scoped>
.div {
  top: 0%;
  position: fixed;
  z-index: 999;
}
.qp{
	position: fixed;
    bottom: 20%;
    right: 2em;
    z-index: 1000;
    color: rgb(255 255 255);
    background: #323232b5;
    padding: 1em;
    border-radius: 10px;
    cursor: pointer;
}
</style>